<template>
  <div class="class-list">
    <ClassItem
      v-for="classItem in classList"
      :key="classItem.id"
      :classItem="classItem"
    />
  </div>
</template>

<script>
import ClassItem from "@/components/ClassItem.vue";
export default {
  components: {
    ClassItem,
  },
  data:()=>{
    return {
      classList:null
    }
  },
  activated(){
    this.classList = JSON.parse(localStorage.getItem("classItemList")) || [];
    console.log(this.classList);
  }
};
</script>

<style lang="scss" scoped>
.class-list {
  width: 100%;
  box-sizing: border-box;
  padding: 0.15rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
</style>